package com.zlzxm.shoesmarket.view.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.zlzxm.shoesmarket.R;
import com.zlzxm.shoesmarket.view.adapter.entity.EntityMarket;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * CREATE BY zlzxm ON 4/12/21
 */
public class ADMarkets extends BaseQuickAdapter<EntityMarket, BaseViewHolder> {
    public ADMarkets( @Nullable List<EntityMarket> data) {
        super(R.layout.item_market, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, EntityMarket entityMarket) {

        ImageView ivFace = holder.getView(R.id.ivFace);

        Glide.with(getContext())
                .load(entityMarket.getFace())
                .circleCrop()
                .into(ivFace);

    }
}
